package cn.zyl.common.redis.api;

import cn.zyl.demo.common.boot.beans.ResBody;
import cn.zyl.demo.common.beans.TreeNode;
import cn.zyl.demo.common.boot.controller.BaseBootController;
import cn.zyl.demo.common.boot.tools.ResBodyTool;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

/**
 * BaseApiController类说明:
 *
 * @author wsz
 * @version v1.0
 * @date 2020-07-31
 */
@RestController
@RequestMapping("/")
public class BaseApiController extends BaseBootController {
    protected  String modelName = "redis";
    @Override
    protected String getModelName() { return modelName; }

    @Override
    @RequestMapping("info")
    public ResBody<String> info() { return ResBodyTool.success(modelName); }

    /**
     * 测试
     * @return 名称字符串
     */
    @RequestMapping(value = "test",method = RequestMethod.GET)
    public ResBody<String> test(@RequestParam("test") String test, int id, Map<String, Object> map, TreeNode<String ,Object> treeNode){ return ResBodyTool.success("redis"); }
}
